package com.fs.controller;

import com.fs.pojo.UserAddrFlag;
import com.fs.service.UserAddrFlagService;
import com.fs.vo.PageResult;
import com.fs.vo.SysResult;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@Api(tags = "用户地址标签-废弃")
@RestController
@RequestMapping("/userAddrFlag")
public class UserAddrFlagController {

    @Autowired
    private UserAddrFlagService userAddrFlagService;

    //添加
    @PostMapping("/add")
    public SysResult add(@RequestBody UserAddrFlag entity){
        return userAddrFlagService.add(entity);
    }

    //编辑
    @PutMapping("/edit")
    public SysResult edit(@RequestBody UserAddrFlag entity){
        return userAddrFlagService.edit(entity);
    }

    //列表
    @GetMapping("/list")
    public SysResult list(PageResult request){
        return userAddrFlagService.list(request);
    }

    //删除
    @DeleteMapping("/{id}")
    public SysResult deleteById(@PathVariable("id") Integer id){
        return userAddrFlagService.delById(id);
    }

}
